<template>
  <div>
    <!-- 头部 -->
    <div class="header">
      <div class="open">
        <span
          v-if="!isCollapse"
          class="iconfont icon-right-indent"
          @click="changIsCollapse"
        ></span>
        <span
          v-else
          class="iconfont icon-left-indent"
          @click="changIsCollapse"
        ></span>
      </div>
    </div>
    <!-- 内容 -->
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  props: ["isCollapse"],
  methods: {
    changIsCollapse() {
      this.$emit("changeShow");
    },
  },
};
</script>

<style lang="scss" scoped>
.header {
  height: 50px;
  line-height: 50px;
  color: #fff;
  background-color: #1e78bf;
  span {
    font-size: 25px;
  }
}
</style>
